package api_models

import (
	"longmen/server/pkg/db/mysql/models/models_live"
	"longmen/server/pkg/db/mysql/models/models_main"
)

type GetHomeDataResp struct {
	RecommendLives   []*models_live.Live `json:"recommend_lives"`
	HotLives         []*models_live.Live `json:"hot_lives"`
	RecoomendAnchors []*HomeAnchor       `json:"recoomend_anchors"`
	Categorys        []*CategoryLive     `json:"categorys"`
}

type NewHomeDataResp struct {
	SportLives         []*models_live.LiveBaseData `json:"sport_lives"`         //体育
	EntertainmentLives []*models_live.LiveBaseData `json:"entertainment_lives"` //娱乐
}

// 分页默认页数,大小
type GetMHomeDataReq struct {
	PageParam
	Uid int `json:"uid"`
}

type GetMHomeDataResp struct {
	Hot        []*LiveAnchor `json:"hot"`
	RecAnchors []*HomeAnchor `json:"rec_anchors"`
	Lives      []*LiveAnchor `json:"lives"`
	RecMatchs  []*HomeAnchor `json:"rec_matchs"`
}

type HomeAnchor struct {
	Anchor
	Live *models_live.Live `json:"live"`
}

type CategoryLive struct {
	models_live.LiveCategory
	Lives []*LiveAnchor `json:"lives"`
}

type LiveAnchor struct {
	models_live.Live
	Anchor   *Anchor                `json:"anchor"`
	TagInfo  *models_main.ConfigTag `json:"tag_info"`
	GuessTag int                    `json:"guess_tag"` //如果是0表示没有竞猜，1表示有
}

type HotRecommendLive struct {
	Liveid     int64   `json:"liveid"`                     //直播编号
	Title      string  `json:"title"`                      //直播标题
	Thumb      string  `json:"thumb"`                      //直播封面
	ThumbY     string  `json:"thumb_y"`                    //直播y封面
	Categoryid int     `json:"categoryid"`                 //直播分类, 1-足球,13-娱乐
	Hot        int     `json:"hot"`                        //热度
	Status     int     `gorm:"column:status"`              //1:直播中 2:預約 3:取消預約 4:逾期未播 5:結束
	Matchid    int     `json:"matchid"`                    //赛事ID
	SportType  string  `json:"sport_type"`                 //赛事型别
	Stream     string  `json:"stream"`                     //流名
	PullUrl    string  `json:"pull_url"`                   //播流地址
	Anchorid   int     `json:"anchorid" gorm:"primaryKey"` //主播ID
	Anchor     *Anchor `json:"anchor"`                     //主播信息
}

type UserRecommendLiveReq struct {
	Size int `json:"size"` //不传默认返回6条 传了按大小返回
}

type UserRecommendLiveResp struct {
	models_live.Live
	Isattent int `json:"isattent"` // 是否关注
}
